<template>
    <section class="collect-server">
    	<div class="page1" v-show="currentPage===1">
    		
    	
  			<form-common 
  				@add="add" 
  				@search = "search"
  				:formLabel="formLabel" 
  				:formInline="formInline"
  			></form-common>
  				
  			<table-common @detail="detail" @edit="edit"  :tableLabel="tableLabel" :tableData="tableData"></table-common>
    
		</div>
		
		<div class="page2"  v-show="currentPage===2">
			<collect-server-from></collect-server-from>
		</div>
    </section>
</template>

<script>
	import formCommon from "../common/formCommon"
	import tableCommon from "../common/tableCommon"
	import collectServerFrom from "./collectServerFrom"
    export default {
    	components:{
    		formCommon,
    		tableCommon,
    		collectServerFrom
    	},
        data() {
          return {
          	currentPage:1,
          	dialog1Visible:false,
          	formInline:{
          		type:'',
          		myInput:"",
          	},
          	formLabel:[
          		{
          			type:'button',
          			placeholder:'新增',
          			label:'',
          			float:"left",
          			method:'add'
          		},
          		{
          			type:'button',
          			placeholder:'搜索',
          			label:'',
          			float:"right",
          			method:'search'
          		},
          		{
          			type:'input',
          			placeholder:'请输入资源名称搜索',
          			label:'',
          			model:'',
          			float:"right",
          		},
          		{
          			type:'select',
          			placeholder:'请选择',
          			label:'业务分类 ：',
          			float:"right",
          			model:'',
          			options:[
          				{
          					label:'业务分类1',
          					code:0
          				},
          				{
          					label:'业务分类2',
          					code:1
          				}
          			],
          		},
          	],
          	tableLabel:{
          		resocureName:"资源名称",
          		serverName:'服务方名称',
          		serverType:'业务类型',
          		createrData:'创建时间',
          	},
          	tableData:[
          		{
	          		resocureName:"居民身份证",
	          		serverName:'珠海市政府',
	          		serverType:'情报',
	          		createrData:'2018/08/20 10:30',
	          		qiYong:false,
          		},
          		{
	          		resocureName:"居民身份证",
	          		serverName:'珠海市政府',
	          		serverType:'情报',
	          		createrData:'2018/08/20 10:30',
	          		qiYong:true,
          		},
          	
          	],
          };
        },
        methods: {
        	onSubmit(){
        		
        	},
        	add(){
        		this.currentPage = 2;
        	},
        	search(){
        		alert("search");
        	},
        	edit(){
        	},
        	detail(){
        	}
        }
  };
</script>

<style scoped="scoped">
    .page2{
    	width: 850px;
    }
</style>